package com.itgacl.magic4j.modules.comm.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * license信息表
 * </p>
 *
 * @author Created by xudp (alias:孤傲苍狼) 290603672@qq.com
 * @since 2022-01-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("comm_license")
@ApiModel(value="CommLicense对象", description="license信息表")
public class CommLicense implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "客户名称")
    private String consumerName;

    @ApiModelProperty(value = "客户手机号")
    private String consumerCellphone;

    @ApiModelProperty(value = "授权IP地址(唯一)")
    private String licenseIp;

    @ApiModelProperty(value = "授权码(唯一，用授权的Ip地址生成)")
    private String licenseCode;

    @ApiModelProperty(value = "license模式，0：单机模式，1：时限模式，2：联网模式")
    private Integer mode;

    @ApiModelProperty(value = "授权有效期")
    private LocalDateTime expiryTime;

    @ApiModelProperty(value = "license证书内容加密使用的rsa公钥")
    private String licensePublicKey;

    @ApiModelProperty(value = "license证书内容加密使用的rsa私钥")
    private String licensePrivateKey;

    @ApiModelProperty(value = "自定义私钥使用的种子(长度为8~16)")
    private String seed;

    @ApiModelProperty(value = "license证书内容")
    private String licenseContent;

    @ApiModelProperty(value = "license文件下载链接")
    private String licenseFileUrl;

    @ApiModelProperty(value = "状态  0：正常   1：禁用，2：已过期")
    private Integer status;

    @ApiModelProperty(value = "授权到期通知邮箱")
    private String notifyEmail;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "租户ID")
    private Long tenantId;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "删除标识")
    @TableField(fill = FieldFill.INSERT)
    @TableLogic
    private Integer deleteFlag;


    public static final String ID = "id";

    public static final String CONSUMER_NAME = "consumer_name";

    public static final String CONSUMER_CELLPHONE = "consumer_cellphone";

    public static final String LICENSE_IP = "license_ip";

    public static final String LICENSE_CODE = "license_code";

    public static final String MODE = "mode";

    public static final String EXPIRY_TIME = "expiry_time";

    public static final String LICENSE_PUBLIC_KEY = "license_public_key";

    public static final String LICENSE_PRIVATE_KEY = "license_private_key";

    public static final String SEED = "seed";

    public static final String LICENSE_CONTENT = "license_content";

    public static final String LICENSE_FILE_URL = "license_file_url";

    public static final String STATUS = "status";

    public static final String NOTIFY_EMAIL = "notify_email";

    public static final String REMARK = "remark";

    public static final String TENANT_ID = "tenant_id";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String DELETE_FLAG = "delete_flag";

}
